#ifndef _EKOS_IEC_H_
#define _EKOS_IEC_H_

/* IEC struct */
struct iec_info_t
{
	 struct
	 {
		  uint16_t policy;
		  uint8_t  lock;
		  uint16_t begin;
		  uint16_t end;
	 } recv;

	 struct
	 {
		  uint8_t  lock;
		  uint16_t to;
		  uint16_t next;
		  uint16_t prev;
	 } send;

	 struct
	 {
		  uint32_t arg_a;
		  uint32_t arg_b;
		  uint32_t arg_c;
		  uint32_t arg_d;
	 } cache;
};

/* 接收所有权限级的信息 */
#define IEC_POLICY_ALL    0
/* 接收低权限级的信息(包括相同) */
#define IEC_POLICY_LOWER  1
/* 接收高权限级的信息(包括相同) */
#define IEC_POLICY_HIGHER 2
/* 拒绝所有权限级的信息 */
#define IEC_POLICY_DENY   3

#endif /* _EKOS_IEC_H_ */
